require 'redmine'
RAILS_DEFAULT_LOGGER.info 'Ticket Mails Plugin'

# Redmine ticket emailer plugin
Redmine::Plugin.register :redmine_ticket_mails do
  name 'Ticket Mails'
  author 'Georg Leciejewski'
  description 'Allow users to email tickets to Redmine.'
  version '0.0.1'
  settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'settings/settings'
  # This plugin adds a project module
  # It can be enabled/disabled at project level (Project settings -> Modules)
  project_module :ticket_mails do
    # This permission has to be explicitly given
    # It will be listed on the permissions screen
    permission :view_ticket_mails, {:ticket_mails => [:show,:create]}
  end
# A new item is added to the project menu
  menu :project_menu, :ticket_emails, :controller => 'ticket_mails', :action => 'show'
end
